package org.easymis.crm.modules.system.service;

import java.util.Map;
import java.util.Set;

import org.easymis.crm.modules.system.entitys.mybatis.dto.Member;

public interface MemberService {
	Member findByUsername(String username);

	/**
	 * 获取用户角色
	 * 
	 * @param username
	 * @return
	 */
	public Set<String> getRoles(String username);

	/**
	 * 
	 * @param username
	 * @return
	 */
	public Set<String> getPermissions(String username);

	/**
	 * 登录验证
	 * 
	 * @param username
	 * @param password
	 * @return
	 */

	public Member doLoginCheck(String username, String password);

	/**
	 * 存储登录时的ip
	 */
	public int saveIp(Map<String, String> map);

	/**
	 * 登陆
	 * 
	 * @param loginname
	 * @return
	 */
	Member login(String loginname);

	Member findById(String memberId);
}
